package com.muyu.controller;

import com.muyu.model.entity.LogInfoEntity;
import com.muyu.service.LogInfoService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: LogInfoController
 * @Author: Zirun.Xin
 * @Date: 2025/4/28 下午4:19
 * @Version: 1.0
 * @Description: 日志信息控制层
 */
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/api/v1/log-info")
public class LogInfoController {

    /**
     * 日志信息业务层
     */
    private final LogInfoService logInfoService;

    /**
     * 获取所有日志信息
     * @return 响应结果集
     */
    @GetMapping(value = "/get-logs")
    public List<LogInfoEntity> getLogList() {
        return logInfoService.list();
    }
}
